package com.sailors.common.task.sdk.core.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 刷新进度DTO
 *
 * @description:刷新进度DTO
 * @author: cyj
 * @date 2022 -11-22 17:20:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RefreshProcessDto {
    /**
     * 任务Id （必填）
     */
    private Long taskId;
    /**
     * 进度0-100，到100状态扭转为成功 （必填）
     */
    private BigDecimal process;
    /**
     * 创建人
     */
    private String createBy;
    /**
     * 数据量
     */
    private Long count;
    /**
     * 源文件下载地址（和sourceExcel 给一个就行了）
     */
    private String sourceFileUrl;
    /**
     * 源文件excel数据（会自动转换成一个excel并上传到服务器）
     */
    private ExcelUploadDto sourceExcel;

    public RefreshProcessDto(Long taskId, BigDecimal process, String createBy) {
        this.taskId = taskId;
        this.process = process;
        this.createBy = createBy;
    }

    public RefreshProcessDto(Long taskId, BigDecimal process, String createBy, Long count) {
        this.taskId = taskId;
        this.process = process;
        this.createBy = createBy;
        this.count = count;
    }

    public RefreshProcessDto(Long taskId, BigDecimal process, String createBy, ExcelUploadDto sourceExcel) {
        this.taskId = taskId;
        this.process = process;
        this.createBy = createBy;
        this.sourceExcel = sourceExcel;
    }

    public RefreshProcessDto(Long taskId, BigDecimal process, String createBy, String sourceFileUrl) {
        this.taskId = taskId;
        this.process = process;
        this.createBy = createBy;
        this.sourceFileUrl = sourceFileUrl;
    }
}
